package com.mysql.entity;


import java.util.Date;

/**
 * 作者:wmx  2025-02-24 18:26
 * 1、功能:staffs表-实体类
 * 2、实现:存储员工信息
 * 3、参数
 * @param id 主键
 * @param name 员工姓名
 * @param age 员工年龄
 * @param phone 员工电话号码
 * @param staPos 员工职位
 * @param addTime 员工入职时间
 * @param updateTime 员工更新时间
 **/
public class Staffs {
    private int Id;
    private String Name;
    private int Age;
    private String  Phone;
    private String staPos;
    private Date addTime;
    private Date updateTime;

    public Staffs(int id, String name, int age, String phone, String staPos, Date addTime, Date updateTime) {
        this.Id = id;
        this.Name = name;
        this.Age = age;
        this.Phone = phone;
        this.staPos = staPos;
        this.addTime = addTime;
        this.updateTime = updateTime;
    }

    public Staffs(String name, int age, String phone, String staPos) {
        this.Name = name;
        this.Age = age;
        this.Phone = phone;
        this.staPos = staPos;
    }

    public int getId() {
        return Id;
    }

    public void setId(int id) {
        Id = id;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public int getAge() {
        return Age;
    }

    public void setAge(int age) {
        Age = age;
    }

    public String getPhone() {
        return Phone;
    }

    public void setPhone(String phone) {
        Phone = phone;
    }

    public String getStaPos() {
        return staPos;
    }

    public void setStaPos(String staPos) {

        this.staPos = staPos;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        if( addTime == null)  addTime = new Date();
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        if( updateTime == null)  updateTime = new Date();
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return  "Id=" + Id +
                ", Name='" + Name + '\'' +
                ", Age=" + Age +
                ", Phone='" + Phone + '\'' +
                ", staPos='" + staPos + '\'' +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime;

    }
}
